home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / edit / vedt.zip / DEMO.VDM < prev    next >
Text File  |  1990-09-19  |  10KB  |  412 lines

  1. R* 
  2. R*    VEDIT PLUS Demo Macro - Give DOS command: VDEMO -X DEMO.VDM
  3. R* 
  4. R*    Greenview Data, Inc.
  5. R*    P.O. Box 1586
  6. R*    Ann Arbor, MI, 48106
  7. R*    (313) 996-1299
  8. R* 
  9. ES 6 0            R* Disable regular expressions
  10. ES 8 1            R* Suppress search errors
  11. ES 9 1            R* Use explicit text delimiters
  12. R* 
  13. R*    The following "trick" removes comments from this macro.
  14. R*    Register "Y" is loaded with the commands to strip comments.
  15. R*    We then "chain" to "Y", which finally chains back to "Z".
  16. R* 
  17. RI(y)"EE(z) B 2F/!START!/ 0L -#K #$S/R*|B|Y|>// EE(@) RJ(z)"    R* Load "Y"
  18. RJ(y)                                R* Chain to "Y"
  19. R* 
  20. !START!
  21. (Q11 = -1) JP/MLOOP/        R* Skip setup if macro already running
  22. R* 
  23. R*    Load DEMO.VD2 into register U.
  24. R*    This macro then loads the "subroutine macros"
  25. R* 
  26. RL(U) DEMO.VD2        R* Load 2nd file
  27. EE(U)            R* Switch to edit them
  28. #$S/R*|Y|>//        R* Strip comments
  29. EE(@)            R* Switch back
  30. M(U)            R* Execute DEMO.VD2 - load "subroutines"
  31. EE(U) EQY        R* Empty and remove Buffer "U"
  32. (Q11 = -2) JP/MLOOP/    R* Skip signon if returning from compiler support
  33. R* 
  34. R*    Determine attributes (color) to use for different machines.
  35. R*    First preset for B/W display.
  36. R* 
  37. 112XS(21)        R* Q21 = header attribute (Reverse video)
  38. 112XS(22)        R* Q22 = menu-bar attribute (Reverse video)
  39. 15XS(23)        R* Q23 = user-message attribute (Intense)
  40. 7XS(24)            R* Q24 = normal
  41. 112XS(25)        R* Q25 = reverse
  42. 7XS(26)            R* Q26 = edit window attribute
  43. 7XS(27)            R* Q27 = text (directions) window attribute
  44. 7YEA            R* Normal text attribute
  45.  
  46. (.sd=3) [        R* If IBM Color
  47.  
  48. YEC YEN
  49. YT"Do you have a Color display on your computer (Y/N)? "
  50. [ XK(100)"" Q100&95XS(100) (Q100=="Y | Q100=="N)JL YA ] Q100YD
  51.  
  52. (Q100="Y) [
  53. 23XS(21)        R* Q21 = header attribute (White on blue)
  54. 71XS(22)        R* Q22 = menu-bar attribute (White on red)
  55. 14XS(23)        R* Q23 = user-message attribute (Yellow)
  56. 66XS(24)        R* Q24 = green on red window
  57. 49XS(25)        R* Q25 = blue on cyan window
  58. 23XS(26)        R* Q26 = edit window attribute
  59. 2XS(27)            R* Q27 = text (directions) window attribute
  60. 2YEA            R* Normal text attribute
  61. ][
  62. YYM            R* No - change to monochrome attributes
  63. ]
  64. ]
  65.  
  66. M(S)            R* Execute the signon macro
  67. RE(S)            R* Empty the signon macro
  68. 0XS(12)            R* Init main-menu selection
  69.  
  70. R* 
  71. R*        ------------   M A I N    P R O G R A M  ------------
  72. R* 
  73.  
  74. !MLOOP!            R* Main loop
  75. YWI            R* Init all windows; reset text attributes
  76. 22085YYE        R* Make <ESC> perform [VISUAL EXIT]
  77. (.sl<>25) [25YEM]    R* Switch EGA/VGA to 25 lines
  78. EE(1) EQY        R* Clear edit buffers 1, 2, 7, 8, A, B, C
  79. EE(2) EQY
  80. EE(7) EQY
  81. EE(8) EQY
  82. EE(A) EQY
  83. EE(B) EQY
  84. RE(P)            R* Empty registers P and T
  85. RE(T)
  86. EE(@)            R* Switch to main edit buffer
  87. EZY            R* Clear main edit buffer; also resets indentation
  88. EP 4 0            R* Disable LC to UC conversion
  89. EP 7 0            R* Disable word wrap
  90. 1YML            R* Reset left margin
  91. 0YMS            R* Reset horizontal scroll
  92. PP 4 10            R* Left printer margin
  93. ES 3 0            R* Disable auto-indent
  94. ES 6 0            R* Disable regular expressions
  95. ES 8 1            R* Suppress search errors
  96. ES 9 1            R* Use explicit text delimiters
  97. ES 11 0            R* Disable justification
  98. 1RPROT(H,Z)        R* Write protect registers H - Z from visual mode
  99. +RA(Z)            R* Auto-execute register Z
  100. -XS(11)            R* Flag that macro running
  101.  
  102. RI(9)/  VEDIT FAMILY DEMONSTRATION -- MAIN MENU  /
  103.  
  104. RI(8)\Introduction
  105. List Main Features
  106. List Supplied and Optional "Macros"
  107. Demonstrate Basic Editing Features (Tutorial)
  108. Demonstrate Program Development Features
  109. Demonstrate Word Processing Features
  110. Demonstrate Keystroke Macros
  111. Demonstrate Printing
  112. Demonstrate Windows and EGA/VGA support (VEDIT)
  113. Demonstrate Multiple File Editing       (VEDIT)
  114. Demonstrate Multiple File Processing    (VEDIT)
  115. Demonstrate Basic Command Mode Features (VEDIT PLUS)
  116. Demonstrate DOS Commands                (VEDIT PLUS)
  117. Explain Configuration Options
  118. Exit Demonstration
  119. \
  120.  
  121. q22XS(8)        R* Set menu-bar attribute
  122. M(M)            R* Display menu - get user's option in Q12
  123.  
  124. EE(8) EQY        R* Clear edit buffer 8
  125. EE(@)            R* Ensure main edit buffer
  126.  
  127. (q12 = 1)  [ JP/L-INTRO/ ]
  128. (q12 = 2)  [ JP/L-MAIN/ ]
  129. (q12 = 3)  [ JP/L-MAC/ ]
  130. (q12 = 4)  [ JP/D-VIS/ ]
  131. (q12 = 5)  [ JP/D-PROG/ ]
  132. (q12 = 6)  [ JP/D-WORD/ ]
  133. (q12 = 7)  [ JP/D-KEY/ ]
  134. (q12 = 8)  [ JP/D-PRN/ ]
  135. (q12 = 9)  [ JP/D-WIN/ ]
  136. (q12 = 10) [ JP/D-MULT/ ]
  137. (q12 = 11) [ JP/D-GROUP/ ]
  138. (q12 = 12) [ JP/D-COMM/ ]
  139. (q12 = 13) [ JP/D-DOS/ ]
  140. (q12 = 14) [ JP/E-CONF/ ]
  141. (q12 = 15) [ JP/L-EXIT/ ]
  142.  
  143. R* 
  144. R* L-INTRO - List introduction
  145. R* 
  146. !L-INTRO!
  147.  
  148. RI(9)/     VEDIT Family - Introduction     /
  149. RI(8)/DEMO1.TXT/    R* File name of text
  150. M(L)            R* Display the text
  151.  
  152. JP/MLOOP/
  153.  
  154.  
  155. R* 
  156. R* L-MAIN - List Main features
  157. R* 
  158. !L-MAIN!
  159.  
  160. RI(9)/VEDIT Family - Main Features/
  161. RI(8)/DEMO2.TXT/
  162. M(L)
  163.  
  164. JP/MLOOP/
  165.  
  166.  
  167. R* 
  168. R* L-MAC - List Supplied Macros
  169. R* 
  170. !L-MAC!
  171.  
  172. RI(9)/VEDIT and VEDIT PLUS - Supplied and Optional Macros/
  173. RI(8)/DEMO4.TXT/
  174. M(L)
  175.  
  176. JP/MLOOP/
  177.  
  178.  
  179. R* 
  180. R* E-CONF - Explain Configuration Options
  181. R* 
  182. !E-CONF!
  183.  
  184. RI(9)/VEDIT Family - Configuration Options/
  185. RI(8)/DEMO16.TXT/
  186. M(L)
  187.  
  188. JP/MLOOP/
  189.  
  190.  
  191. R* 
  192. R* D-VIS - Demonstrate basic Visual Mode features
  193. R* 
  194. !D-VIS!
  195. RL(T) DEMO4.VDM
  196. M(T)
  197. JP/MLOOP/
  198.  
  199.  
  200. R* 
  201. R* D-PROG - Demonstrate Programming features
  202. R* 
  203. !D-PROG!
  204. RL(T) DEMO12.VDM
  205. M(T)
  206. JP/MLOOP/
  207.  
  208.  
  209. R* 
  210. R* D-WORD - Demonstrate Word Processing features
  211. R* 
  212. !D-WORD!
  213. RL(T) DEMO14.VDM
  214. M(T)
  215. JP/MLOOP/
  216.  
  217.  
  218. R* 
  219. R* D-PRN - Demonstrate Printing
  220. R* 
  221. !D-PRN!
  222. RL(T) DEMO10.VDM
  223. M(T)
  224. JP/MLOOP/
  225.  
  226.  
  227. R* 
  228. R* D-KEY - Demonstrate Keystroke Macros
  229. R* 
  230. !D-KEY!
  231. RL(T) DEMO7.VDM
  232. M(T)
  233. JP/MLOOP/
  234.  
  235.  
  236. R* 
  237. R* D-WIN - Demonstrate Windows
  238. R* 
  239. !D-WIN!
  240. RL(T) DEMO5.VDM
  241. M(T)
  242. JP/MLOOP/
  243.  
  244.  
  245. R* 
  246. R* D-MULT - Demonstrate Multiple File Editing
  247. R* 
  248. !D-MULT!
  249. RL(T) DEMO6.VDM
  250. M(T)
  251. JP/MLOOP/
  252.  
  253.  
  254. R* 
  255. R* D-GROUP - Demonstrate Multiple File Processing
  256. R* 
  257. !D-GROUP!
  258. RL(T) DEMO9.VDM
  259. M(T)
  260. JP/MLOOP/
  261.  
  262.  
  263. R* 
  264. R* D-COMM - Demonstrate Command Mode
  265. R* 
  266. !D-COMM!
  267. RI9/VEDIT PLUS - Command Mode Demo/
  268. M(H)
  269.  
  270. YT/
  271. You can perform all routine editing entirely in the easy to use Visual Mode.
  272. However, the Command Mode is even more powerful; it is a complete programming
  273. language.  You can use the commands singly or combine them into programs
  274. called "macros".  Remember that this entire demo is written as a "macro".
  275.  
  276. You may find the Command Mode a little cryptic at first.  However, this
  277. programming language has several advantages over more verbose ones.  First,
  278. you can create a program or "macro" at any time and use it immediately.  There
  279. is no time wasted with "compiling", yet it executes as fast as a compiled one.
  280. The language is interactive; you can easily change macros and debug complex
  281. ones.  You can try out the commands one by one.  The short commands let you do
  282. a lot with just a few keystrokes.
  283.  
  284. You don't have to be a programmer to use "macros".  We regularly receive
  285. letters from people who say that VEDIT PLUS is the first programming language
  286. they can understand and use.
  287.  
  288. /
  289.  
  290. M(K)
  291.  
  292. 5YEV 0YEH        R* Position cursor
  293. YES            R* Clear rest of screen
  294.  
  295. YT/
  296. You have to be a little careful when running this part of the demo.  Since
  297. you will really be in the Command Mode, this demo macro is no longer running
  298. and it cannot catch your errors.  (Of course there is nothing you can hurt,
  299. but it is possible to stop this demo.)
  300.  
  301.  
  302. REMEMBER:  You can enter commands in upper or lower case.  You must press
  303.        <Enter> at the end of each command line in Command Mode.
  304.  
  305. REMEMBER:  Give the command "MN" to continue with the next step of the demo.
  306.  
  307. REMEMBER:  If things don't seem to be working right, first press <CTRL-C>.
  308.        Then give the command "MZ" to return to the Main Menu.
  309.  
  310.  
  311. /
  312.  
  313. M(K)
  314.  
  315. YWR(1) 41        R* Setup 2 windows
  316. YWB($) 9
  317.  
  318. EE(1)
  319. B#K
  320. ER demo8.txt 0A        R* Load instruction text
  321. -V            R* Display text
  322.  
  323. EE(@)
  324. B#K            R* Empty edit buffer
  325. ER demo.txt 0A        R* Load demo text
  326. -V            R* Display text
  327.  
  328. YWS$            R* Switch to command mode window
  329. YEN
  330.  
  331. RA(0)            R* Disable auto-execution
  332. JO            R* Goto command mode
  333.  
  334.  
  335. R* 
  336. R* D-DOS - Demonstrate DOS Commands
  337. R* 
  338. !D-DOS!
  339. RI(9)/VEDIT PLUS - Demonstrate DOS Commands/
  340. M(H)
  341.  
  342. YT/
  343. You can run DOS commands and other programs from within any VEDIT Family
  344. editor